package com.musicapp;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.bumptech.glide.Glide;

import java.util.List;

public class EditAdapter extends RecyclerView.Adapter<EditAdapter.ViewHolder> {
//    private OnItemClickListener mOnItemClickListen;

    public EditAdapter(){
    }

//    public interface OnItemClickListener{
//        void onItemClick(View view,int position);
//    }

//    public void setmOnItemClickListen(OnItemClickListener onItemClickListen){
//        this.mOnItemClickListen = onItemClickListen;
//    }

    @NonNull
    @Override
    public EditAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext())
                .inflate(R.layout.edit,parent,false);
        return new EditAdapter.ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
//        if(mOnItemClickListen!=null){
//            holder.imageView1.setOnClickListener(v->mOnItemClickListen.onItemClick(v,position));
//        }
    }

    @Override
    public int getItemCount() {
        return 1;
    }

    public static class ViewHolder extends RecyclerView.ViewHolder{
        public EditText editText;
        public ViewHolder(@NonNull View itemview){
            super(itemview);
            editText = itemview.findViewById(R.id.edit);
        }
    }
}
